#ifndef _VECTOR
#define _VECTOR

#include "Base.h"

#include <cstring>
#include <cmath>

class Vector
{
public:

  union
  {
    struct { fp x,y,z; };
    struct { fp c[3]; };
  };

  Vector(
    const fp _x = 0.0f,
    const fp _y = 0.0f,
    const fp _z = 0.0f
  );  
  Vector(const Vector& b);

  void  Clear();

  fp    Magnitude() const;
  void  Unitize();
  
  Vector operator -   ();

  Vector operator *   (const fp k) const;
  Vector& operator *= (const fp k);

  Vector operator /   (const fp k) const;
  Vector& operator /= (const fp k);

  Vector operator +   (const Vector& b) const;
  Vector& operator += (const Vector& b);

  Vector operator -   (const Vector& b) const;
  Vector& operator -= (const Vector& b);

  Vector& operator =  (const Vector& b);

  bool operator ==    (const Vector& b) const;
  bool operator !=    (const Vector& b) const;

  fp operator *       (const Vector& b) const;
  Vector operator ^   (const Vector& b) const;
};

#endif // _VECTOR
